Skip to content

README: restructure as a pattern index with mermaid shapes - #15

Merged
koriym merged 3 commits into
1.xfrom
readme-pattern-index
Apr 15, 2026
Merged

koriym merged 3 commits into
1.xfrom
readme-pattern-index

Conversation

@koriym

@koriym koriym commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Shifts the README from a philosophy-first doc to a problem-first pattern index, so a reader can match their use case to a pattern in seconds.

Key changes

  • New "Choose a pattern" use-case index at the top — maps problem shapes to pattern names and demo links.
  • Mermaid abstract flowcharts on every pattern card — GitHub renders them natively, so the shape is scannable before reading any text. Concrete class-name flows are kept below as reference.
  • Removed the top-level "Philosophy" section; the six-layer vocabulary now lives in a "Background" section at the end, linking out to CLAUDE.md, GLOSSARY.md and PHILOSOPHY.md.
  • Removed the Beginner/Intermediate/Advanced level labels — the ordering and diagrams already convey complexity.
  • Removed the numeric "At a glance" counts table — the shapes convey the same information visually.
  • Title rename: "BE Framework Demos" → "Be Framework Patterns" (matches the repo rebrand).
  • Fix stale test command: `composer test` at the repo root does not exist; replaced with the per-demo install+phpunit invocation.
  • README.ja.md mirrors all of the above.

Follow-up (separate repo, not this PR)

`be-framework/be-skills` `be/SKILL.md` references this README and will need a companion update:

  • `be-demos` → `be-patterns` in text, clone URL, raw URL, and cache path
  • The hardcoded "Beginner / Intermediate / Advanced" bullet list (lines 67–69) depends on a section removed here and should be replaced with the new pattern names

Test plan

  • mermaid diagrams render on GitHub preview
  • all internal links resolve
  • README.ja.md structure matches README.md

Summary by CodeRabbit

Documentation

  • Renamed project to "Be Framework Patterns" with reframed content structure
  • Added decision table for pattern selection linking problems to demos
  • Introduced Mermaid flow diagrams for all eight patterns with state examples
  • Created new "Background" section with layer definitions and vocabulary table
  • Added machine-readable pattern catalog reference
  • Updated test execution instructions with specific demo examples

Shift the entry point from philosophy-first to problem-first:

- Replace the top-of-file "Philosophy" section with a "Choose a
  pattern" use-case index. Readers match their problem to a pattern
  without having to learn the ontology first.
- Add an abstract mermaid flowchart to each pattern card so the shape
  is scannable at a glance. Concrete class-name flows are kept below
  as reference.
- Drop the Beginner/Intermediate/Advanced level labels; complexity
  is already implied by ordering and the diagrams.
- Drop the numeric "At a glance" counts table; the shapes convey the
  same information visually.
- Move the six-layer vocabulary table into a "Background" section at
  the end with links to CLAUDE.md, GLOSSARY.md and PHILOSOPHY.md.
- Rename the title from "BE Framework Demos" to "Be Framework
  Patterns" to match the repository rebrand.
- Fix the stale `composer test` instruction (no root composer exists;
  each demo installs independently).

Japanese README mirrors all of the above.
@koriym

koriym commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@koriym has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d099b2ca-b65f-4791-a825-1dc5bff8ba85

📥 Commits

Reviewing files that changed from the base of the PR and between f3326e9 and e186e85.

📒 Files selected for processing (2)
  • README.ja.md
  • README.md
📝 Walkthrough

Walkthrough

README files reframed the project from "BE Framework Demos" to "Be Framework Patterns". Reorganized content by replacing Philosophy sections with pattern decision tables and Mermaid flow diagrams, added Background section documenting six-layer vocabulary, linked to docs/patterns.json catalog, and revised test execution instructions.

Changes

Cohort / File(s) Summary
README Documentation
README.md, README.ja.md
Reframed project positioning from demo showcase to pattern catalog. Replaced Philosophy section with "Choose a pattern" decision tables. Added Mermaid flow diagrams for eight patterns (minimal, linear, chain, diamond, chain+moment, branching, cascade diamond, composite convergence). Introduced Background section with six-layer vocabulary table. Updated test execution examples and linked to docs/patterns.json. Removed old pattern summary table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Eight patterns hop through frames so neat,
From "demos" to a catalog complete—
Diagrams flow with Mermaid's grace,
Six layers guide us through the space,
A framework's story, finally neat! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: restructuring READMEs from a philosophy-first format to a pattern index with visual Mermaid diagrams, matching the core objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch readme-pattern-index

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.ja.md`:
- Around line 71-83: The README diagrams/text currently present a Being-centric
flow but the catalog patterns 'diamond', 'cascade-diamond', and
'complex-convergence' are defined as moment-driven (being: 0); update the
README.ja.md descriptions and Mermaid diagrams (the "フロー: Input → [並列Beings] →
[並列Moments] → Final" block and the associated captions) to reflect Moment-driven
convergence semantics by removing Being-centric intermediate flows, showing
Moments as the drivers that converge to Final, and updating labels/captions
accordingly (alternatively, if the README was correct, update the three pattern
entries in docs/patterns.json to set being>0 and adjust their convergence
semantics—pick one source of truth and make the README and the
'diamond'/'cascade-diamond'/'complex-convergence' definitions consistent).

In `@README.md`:
- Around line 71-83: The README's pattern diagrams/descriptions for "Diamond",
"Cascade Diamond", and "Complex Convergence" conflict with docs/patterns.json
which defines these patterns as being: 0 and Moment-centric; update README.md so
those three pattern sections (and their mermaid diagrams) remove explicit Being
intermediates and instead describe/render Moment-centric convergence consistent
with docs/patterns.json's "being: 0" model (or if you prefer the README version,
update docs/patterns.json entries for Diamond, Cascade Diamond, and Complex
Convergence to include the corresponding Being counts and Moment flow and ensure
the JSON "being" field and convergence description match the README); make sure
the pattern names and examples in README.md exactly mirror the structure and
fields in docs/patterns.json.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5386c665-50db-418c-a532-6fe72a9c0c75

📥 Commits

Reviewing files that changed from the base of the PR and between f6adf88 and f3326e9.

📒 Files selected for processing (2)
  • README.ja.md
  • README.md

Comment thread README.ja.md Outdated
Comment thread README.md Outdated
koriym added 2 commits April 15, 2026 16:58
CodeRabbit pointed out that the Diamond, Cascade Diamond, Complex
Convergence and blog-publishing cards described Being-centric flows
that don't match docs/patterns.json (which is the ground truth, verified
against the source):

- order-processing (diamond): being=0, moment=3 — Input goes directly
  to OrderConfirmed, which injects three Moments. The old ASCII/mermaid
  showed three parallel Being chains that are not in the #[Be] graph.
- loan-application (cascade-diamond): being=0, moment=2 — Input goes
  directly to LoanApproved, which injects two Moments. The "cascade" is
  internal to the Moments' Potentials, not a two-stage Being pipeline.
- insurance-claim (complex-convergence): being=0, moment=5, final=2 —
  both Inputs declare #[Be([ClaimSettled, ClaimEscalated])] and Moments
  are shared across both Finals. The old diagram showed a single
  converging Being followed by a fan-out.
- blog-publishing (staged-sequential): being=1, moment=0 — externally
  Linear. The distinctive feature is a single Being that orchestrates
  several Reason services, not a 3-Being / 2-Moment chain.

Fix:
- Rewrite the four mermaid diagrams to match the live #[Be]/#[Inject]
  graph; use dashed arrows for injected Moments.
- Rename "Sequential + Moments" to "Multi-Reason Being" and rewrite
  the description to be about Reason orchestration.
- Update the "Choose a pattern" use-case descriptions for the four
  affected rows.
- Add a diagram legend at the top of the catalog explaining solid vs
  dashed arrows.

README.ja.md mirrors all of the above.
@koriym

koriym commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai 指摘ありがとうございます。docs/patterns.json と実ソースを突き合わせて確認した結果、ご指摘の通り README の Diamond / Cascade Diamond / Complex Convergence / blog-publishing の図が live graph と食い違っていました(Input が直接 Final に #[Be] し、Final が Moment を #[Inject] する形が正)。

patterns.json を source of truth として、以下を修正しました (e186e85):

  • 4パターンの mermaid 図を実際の #[Be] / #[Inject] グラフに合わせて書き直し(注入 Moment は破線矢印)
  • blog-publishing の呼称を "Sequential + Moments" → "Multi-Reason Being" に変更(being=1, moment=0 に整合)
  • Choose a pattern テーブルの該当4行のユースケース記述を更新
  • カタログ先頭に実線/破線の凡例を追加

README.ja.md も同様に反映しています。

@coderabbitai

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@koriym: こちらこそ、patterns.json をソース・オブ・トゥルースとして丁寧に照合・修正いただきありがとうございます。

  • 実線 (#[Be]) / 破線 (#[Inject]) の凡例追加は、図の読み解きやすさを大きく向上させますね。
  • "Multi-Reason Being" への改称も being=1/moment=0 の実態に正確に合致しています。
  • README.ja.md への反映まで一貫して対応いただき、ドキュメントの整合性が保たれました。

修正内容を確認しました。ありがとうございます!


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@koriym
koriym merged commit 273ccaa into 1.x Apr 15, 2026
25 checks passed
@koriym
koriym deleted the readme-pattern-index branch April 15, 2026 08:07
koriym added a commit to be-framework/be-skills that referenced this pull request Apr 15, 2026
Follow up on be-framework/be-patterns#14 (namespace rename) and
be-framework/be-patterns#15 (README restructure): rename be-demos
references to be-patterns and replace the removed Beginner/
Intermediate/Advanced listing with the new pattern index.

Fixes #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant